import {
  NextFunction,
  Request,
  Response,
  RequestHandler,
  Application,
} from "express";
import BaseModel from "../models/base";

export default class BaseController {
  model: BaseModel;

  constructor(model: BaseModel) {
    this.model = model;
  }

  async getList(req: Request, res: Response, next: NextFunction) {
    const books = await this.model.list();
    console.log("🚀 ~ BaseController ~ getList ~ books:", books);
    res.json(books);
    return books;
  }
}
